package com.songhuan.web.controller;
import com.songhuan.web.dto.*;
import com.songhuan.web.dto.query.*;
import com.songhuan.web.entity.*;
import com.songhuan.web.mapper.*;
import com.songhuan.web.service.*;
import com.songhuan.web.tools.dto.*;
import com.songhuan.web.dto.query.OrganizationRelativeUserPagedInput;
import com.songhuan.web.dto.OrganizationRelativeUserDto;
import com.songhuan.web.mapper.OrganizationRelativeUserMapper;
import com.songhuan.web.service.OrganizationRelativeUserService;
import com.songhuan.web.tools.dto.IdInput;
import com.songhuan.web.tools.dto.IdsInput;
import com.songhuan.web.tools.dto.PagedResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import lombok.SneakyThrows;

/**
 * 班级关联控制器
 */
@RestController()
@RequestMapping("/OrganizationRelativeUser")
public class OrganizationRelativeUserController {
    @Autowired()
    private OrganizationRelativeUserService _OrganizationRelativeUserService;
    @Autowired()
    private OrganizationRelativeUserMapper _OrganizationRelativeUserMapper;
    /**
     * 班级关联分页查询
     */
    @RequestMapping(value = "/List", method = RequestMethod.POST)
    @SneakyThrows
    public PagedResult<OrganizationRelativeUserDto> List(@RequestBody OrganizationRelativeUserPagedInput input)  {
        return _OrganizationRelativeUserService.List(input);
    }
     /**
     * 单个班级关联查询接口
     */
    @RequestMapping(value = "/Get", method = RequestMethod.POST)
    @SneakyThrows
    public OrganizationRelativeUserDto Get(@RequestBody OrganizationRelativeUserPagedInput input) {

        return _OrganizationRelativeUserService.Get(input);
    }
  
    /**
     * 班级关联创建或则修改
     */
    @RequestMapping(value = "/CreateOrEdit", method = RequestMethod.POST)
    public OrganizationRelativeUserDto CreateOrEdit(@RequestBody OrganizationRelativeUserDto input) throws Exception {
        return _OrganizationRelativeUserService.CreateOrEdit(input);
    }
    /**
     * 班级关联删除
     */
    @RequestMapping(value = "/Delete", method = RequestMethod.POST)
    public void Delete(@RequestBody IdInput input)
    {
        _OrganizationRelativeUserService.removeById(input.getId());
    }

    /**
     * 班级关联批量删除
     */
    @RequestMapping(value = "/BatchDelete", method = RequestMethod.POST)
    public void BatchDelete(@RequestBody IdsInput input)
    {
        _OrganizationRelativeUserService.removeByIds(input.getIds());
    }
    /**
     * 班级申请
     */
    @RequestMapping(value = "/Apply", method = RequestMethod.POST)
    public void Apply(@RequestBody OrganizationRelativeUserDto input)
    {
        _OrganizationRelativeUserService.Apply(input);
    }
    /**
     * 申请成功
     */
    @RequestMapping(value = "/ApplySuccess", method = RequestMethod.POST)
    public void ApplySuccess(@RequestBody OrganizationRelativeUserDto input)
    {

        _OrganizationRelativeUserService.ApplySuccess(input);
    }



 
}
